Skip to content

dispatch: adjust for LLP64 environments #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2018
Merged

Conversation

compnerd
Copy link
Member

LLP64 environments use a 32-bit long value. This would result in
truncation as the long is used to transfer a pointer value here.
Adjust the types accordingly. Since the width on LP64 environments is
equivalent in this change, this should only impact LLP64 environments
and be ABI stable otherwise.

LLP64 environments use a 32-bit long value.  This would result in
truncation as the `long` is used to transfer a pointer value here.
Adjust the types accordingly.  Since the width on LP64 environments is
equivalent in this change, this should only impact LLP64 environments
and be ABI stable otherwise.
@compnerd
Copy link
Member Author

CC: @das @MadCoder

@compnerd
Copy link
Member Author

@swift-ci please test

@@ -38,7 +38,7 @@ __BEGIN_DECLS
* Note: static and global variables default to zero.
*/
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
typedef long dispatch_once_t;
typedef intptr_t dispatch_once_t;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should really be uintptr_t I don't like signed integers for these.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I only used intptr_t since it was long which is a signed value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right and since it's API it may cause build fallouts... ok convinced let's keep intptr_t ugh

@MadCoder MadCoder merged commit 698220e into swiftlang:master Feb 22, 2018
@compnerd compnerd deleted the llp64 branch February 22, 2018 00:37
ktopley-apple pushed a commit that referenced this pull request Dec 6, 2018
dispatch: adjust for LLP64 environments

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants